refactor(mcp): rename mcp-remote-add to mcp-http, generalize header#14
Merged
Conversation
The previous name implied the server had to be off-machine, but opencode's `type: "remote"` is just HTTP transport — the URL can point to localhost. Renamed to mcp-http / mcp-http-noauth, which also matches the existing `<topic>-<descriptor>` naming pattern in presets/. Generalized the auth variant beyond hardcoded `Authorization: Bearer <token>`: it now prompts for a header name and value so the same preset covers bearer auth, upstream API tokens (e.g. X-Bitbucket-Token), and other custom headers needed by MCP servers that proxy to backend services. Breaking change for users referencing the old preset names.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mcp-remote-add/mcp-remote-add-noauth→mcp-http/mcp-http-noauth. The previous name implied the server had to be off-machine, but opencode'stype: "remote"is just HTTP transport — localhost is valid. New names also match the existing<topic>-<descriptor>naming pattern inpresets/.Authorization: Bearer <token>and instead prompt for a header name + value. Single preset now covers bearer auth, upstream API tokens (e.g.X-Bitbucket-Tokenfor an MCP server proxying to Bitbucket), and other custom headers.Breaking change for anyone referencing the old preset names.
Note: this branch also carries the two unpushed version-bump commits (0.3.1, 0.3.2) that were sitting on local
master.Test plan
npm test(47 passing)mcp-httpto a scratchopencode.jsonwithAuthorization/Bearer xyzand confirm the resultingmcp.<name>.headersblockmcp-httpwithX-Bitbucket-Token/ raw token and confirm the header is written verbatimmcp-http-noauthand confirm noheaderskey is written